package org.mashibing.remote;

import org.mashibing.dto.PassengerUser;
import org.mashibing.dto.ResponseResult;
import org.mashibing.request.VerificationCodeDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author:
 * @create: 2024/3/28 11:01
 * @description:
 */
@FeignClient("service-passenger-user")
public interface ServicePassengerUserClient {

    @PostMapping("/user")
    ResponseResult<String> loginOrRegister(@RequestBody VerificationCodeDTO verificationCodeDTO);

    @GetMapping("/user/{passengerPhone}")
    ResponseResult<PassengerUser> getUser(@PathVariable String passengerPhone);
}
